// import { EventKey } from '../common/Key';
import { EventKey } from "../common_for_guosheng/Key";
import { GameGSState } from '../game_for_guosheng/GameGSState';
cc.Class({
    extends: require('BaseGSPanel'),

    properties: {
    },

    onLoad() {
        this.dnmd();
    },

    onEnter(args, action = true) {
        this.dnmdonEnter(args, action);

    },

    onExit(args) {
        this.dnmdonExit(args);
    },

    FunMudPListener(button) {
        let name = button.node.name;
        if (name == 'btnClose') {
            this._onForGuoShenClose();
        } else if (name == 'btnContinue') {
            this._onForGuoShenClose();
        } else if (name == 'btnRetry') {
            GameGSState.setLevel(0);
            // 回收所有星星节点
            F.OnEvent.fire(EventKey.EVENT_RECOVER_CELL);
            F.OnEvent.fire(EventKey.EVENT_RETRY);
            this._onForGuoShenClose();
        } else if (name == 'btnHome') {
            // 回收所有星星节点
            F.OnEvent.fire(EventKey.EVENT_RECOVER_CELL);
            F.OnEvent.fire(EventKey.EVENT_SAVE_GAME_DATA);
            // 返回主界面
            F.Game.loadScene('SceneHome');
            F.Game.gameAudioGS.stopBgm();
            F.Audio.clearBgm();
        }

    },
    // _onTouchStart() {
    // },

});
